package control;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Slider;
import javafx.scene.control.ToolBar;
import javafx.scene.layout.Pane;
import javafx.stage.Stage;

// 工具栏
public class ToolBarDemo extends Application {
	private Pane root = new Pane();
	private ToolBar tb;
	
	public static void main(String[] args) {
		launch(args);
	}
	
	@Override
	public void start(Stage stage) {
		
		tb = new ToolBar();
		tb.getItems().addAll(new Button("hellow"), new Button("world"), new Slider());
		tb.setStyle("-fx-background-color: red");
		tb.setTranslateX(50);
		tb.setTranslateY(50);
		root.getChildren().add(tb);
		
		Scene scene = new Scene(root, 500, 400);
		stage.setScene(scene);
		stage.show();
	}
}
